﻿
Imports osi.root.delegates
Imports osi.root.formation
Imports osi.root.procedure
Imports osi.root.utils
Imports osi.service.argument

Public Class device_wrapper
    Public Shared Function register(Of T)(ByVal v As Func(Of var, T, pointer(Of T), event_comb)) As Boolean
        Return device_wrapper(Of T).register(v)
    End Function

    Public Shared Function register(Of T)(ByVal v As _do_val_val_ref(Of var, T, T, Boolean)) As Boolean
        Return device_wrapper(Of T).register(v)
    End Function

    Public Shared Function register(Of T)(ByVal v As Func(Of var, T, T)) As Boolean
        Return device_wrapper(Of T).register(v)
    End Function

    Public Shared Function register(Of T)(ByVal type As String,
                                          ByVal v As Func(Of var, T, pointer(Of T), event_comb)) As Boolean
        Return device_wrapper(Of T).register(type, v)
    End Function

    Public Shared Function register(Of T)(ByVal type As String,
                                          ByVal v As _do_val_val_ref(Of var, T, T, Boolean)) As Boolean
        Return device_wrapper(Of T).register(type, v)
    End Function

    Public Shared Function register(Of T)(ByVal type As String,
                                          ByVal v As Func(Of var, T, T)) As Boolean
        Return device_wrapper(Of T).register(type, v)
    End Function

    Public Shared Function wrap(Of T)(ByVal type As String,
                                      ByVal v As var,
                                      ByVal i As T,
                                      ByVal o As pointer(Of T)) As event_comb
        Return device_wrapper(Of T).wrap(type, v, i, o)
    End Function

    Public Shared Function wrap(Of T)(ByVal v As var, ByVal i As T, ByVal o As pointer(Of T)) As event_comb
        Return device_wrapper(Of T).wrap(v, i, o)
    End Function

    Public Shared Function bind(Of T)(ByVal type As String,
                                      ByVal v As var,
                                      ByRef o As Func(Of T, pointer(Of T), event_comb)) As Boolean
        Return device_wrapper(Of T).bind(type, v, o)
    End Function

    Public Shared Function bind(Of T)(ByVal v As var,
                                      ByRef o As Func(Of String, T, pointer(Of T), event_comb)) As Boolean
        Return device_wrapper(Of T).bind(v, o)
    End Function

    Public Shared Function bind(Of T)(ByVal v As var,
                                      ByRef o As Func(Of T, pointer(Of T), event_comb)) As Boolean
        Return device_wrapper(Of T).bind(v, o)
    End Function

    Public Shared Function bind(Of T)(ByVal type As String,
                                      ByVal v As var,
                                      ByRef o As _do_val_ref(Of T, T, Boolean)) As Boolean
        Return device_wrapper(Of T).bind(type, v, o)
    End Function

    Public Shared Function bind(Of T)(ByVal v As var,
                                      ByRef o As _do_val_val_ref(Of String, T, T, Boolean)) As Boolean
        Return device_wrapper(Of T).bind(v, o)
    End Function

    Public Shared Function bind(Of T)(ByVal v As var,
                                      ByRef o As _do_val_ref(Of T, T, Boolean)) As Boolean
        Return device_wrapper(Of T).bind(v, o)
    End Function

    Public Shared Function wrap(Of T)(ByVal type As String, ByVal v As var, ByVal i As T, ByRef o As T) As Boolean
        Return device_wrapper(Of T).wrap(type, v, i, o)
    End Function

    Public Shared Function wrap(Of T)(ByVal v As var, ByVal i As T, ByRef o As T) As Boolean
        Return device_wrapper(Of T).wrap(v, i, o)
    End Function
End Class
